package com.fzkj.times;

import java.text.SimpleDateFormat;

public class Time {
    public static void main(String[] args) {
        long time = System.currentTimeMillis();
        System.out.println("当前时间时：" + time);
        long stopTime = System.currentTimeMillis()+20*60*1000;
        System.out.println("20分钟后：" +stopTime);
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String time1 = df.format(time);
        System.out.println("格式化："+time1);
        String stop = df.format(stopTime);
        System.out.println("格式化："+stop);
    }
}
